import Application from "../application";
import * as Router from "koa-router";
import {bindRoutes} from "../router/bindings";
import {RouterList} from "../../config/router";


export const buildRoutes = () => {
    const app = Application.Instance.getApp();
    const router = new Router();

    bindRoutes(router, RouterList);

    app.use(router.routes());
    app.use(router.allowedMethods());
};
